home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sun Solutions 1997 April to September
/
Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso
/
products
/
Electris
/
_install
/
su.sh
< prev
Wrap
Linux/UNIX/POSIX Shell Script
|
1997-02-25
|
2KB
|
52 lines
#!/bin/sh
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
echo "
Thank you for choosing to install LibC/Inside Trial Version.
Please be sure to get the LICENSE information before attempting to install this software. You will not be able to complete installation without it!
"
#
# Check if root
#
if [ "$USER" = "root" ]; then
while true
do
echo "Would you like to install LibC/Inside, or Quit ? [y/q] \c"
read ans
case "$ans" in
y|Y|yes|YES) exec $COMPANY_DIR/_install/install_unbundled;exit 0
;;
N|Q|n|q|No|quit|NO|QUIT|Quit) echo;echo;echo " cancelling installation"; sleep 5 ; exit 1
;;
* ) echo ; echo ; echo "Please answer with y if you wish to install,"
echo " or q if you wish to quit (stop the install)"
;;
esac
done
else
while true
do
echo "You need to be super user to install this software. \c"
echo ""
echo "Would you like to install LibC/Inside, or Quit ? [y/q] \c"
read ans
case "$ans" in
y|Y|yes|YES) echo "";echo "Enter super user \c";su root -c '$COMPANY_DIR/_install/install_unbundled';exit 0
;;
N|Q|n|q|No|quit|NO|QUIT|Quit) echo;echo;echo " cancelling installation of LibC/Inside"; sleep 5 ; exit 1
;;
* ) echo ; echo ; echo "Please answer with y if you wish to install,"
echo " or q if you wish to quit (stop the install)"
;;
esac
done
fi